<?php
if(sizeof($arrNode['total']) > 0)
{
?>
    <ul class="film-gallery" style="margin-top:10px">
<?php
    foreach($arrNode['data'] as $index => $node)
    {
?>
        <li>
            <a href="<?php echo site_url().'/'.$category.'/view/id/'.$node['node_id']; ?>">
                <img class="list_thumb" src="<?php echo $node['thumb']; ?>" alt="<?php echo $node['title']; ?>" title="<?php echo $node['title']; ?>" />
                <div>
                    <a href="<?php echo site_url().'/'.$category.'/view/id/'.$node['node_id']; ?>" title="<?php echo $node['title']; ?>">
                        <?php echo $this->utf8_substr($node['title'], 0, 18); ?>
                    </a>
                </div>
            </a>
        </li>
<?php
    }
?>
    </ul>
    <br class="clear" />
    <div class="video-paging">
    <?php
        $totalPage = ceil($arrNode['total'] / $limit);
        
        if($totalPage > 1)
        {
            $i = $page - 2;
            $j = $page + 2;
            
            if($i < 1)
                $i = 1;
            if($j > $totalPage)
                $j = $totalPage;

            for($i; $i<=$j; $i++)
            {
        ?>
                <a href="javascript:void(0);" <?php echo ($i==$page)?'class="current"':''; ?> onclick="getNewVideo('<?php echo $category; ?>',<?php echo $categoryID; ?>,<?php echo $i; ?>,<?php echo $limit; ?>,'<?php echo $prefix; ?>');">
                    <?php echo $i; ?>
                </a>
        <?php
            }
        }
     ?>
    </div>
<?php
}
else
{
?>
        <li style="color:#FFF;text-align:center;">Chưa có video nào.</li>
<?php
}
?>